package com.itheima.oopadvanced.innerclass_anonymous;

/**
 * @author Anomaly
 * @date 2022/12/28 17:14
 */
public class Test2 {
    public static void main(String[] args) {
        Swimming swimming = new Swimming() {

            @Override
            public void swim() {
                System.out.println("@Override swim()");
            }
        };
        swimming.swim();
    }
}

interface Swimming {
    void swim();
}